<template>
  <div id="app">
    <!-- app
    <hr>
    <HelloWorld>
      <template v-slot:header>
        <p>1231</p>
      </template>
      <template #[aa]='xx'>
        <p>1232--{{xx.a}}</p>
      </template>
      <template #footer='xx'>
        <p>1233--{{xx.b}}</p>
      </template>
    </HelloWorld>-->
    {{arr}}
  </div>
</template>

<script>
import HelloWorld from "./components/HelloWorld";
// import axios from './axios/index'
import axios from "axios";
export default {
  name: "App",
  data() {
    return {
      aa: "abc",
      arr: []
    };
  },
  mounted() {
    // axios({
    //   url:'http://localhost/api.php/system/stu',
    //   method:'get',
    //   params:{
    //     transform:1
    //   },
    //   success:data=>{
    //     this.arr = data
    //   }
    // })
    axios({
      url: "http://localhost/api.php/system/stu",
      method: "get",
      params: {
        transform: 1
      }
    })
      .then(data => {
        this.arr = data.data.stu[0].name;
      })
      .catch(err => {
        console.log(err);
      });
  },
  components: {
    HelloWorld
  }
};
</script>

<style>
#app {
  text-align: center;
}
</style>
